﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FinalProject.Entities;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace FinalProject.Web.ViewModels
{
    public class ClientViewModel
    {
        public int Id { get; set; }
        public PersonName PersonName { get; set; }
        [DisplayName("Phone Number")]
        [Required]
        [DataType(DataType.PhoneNumber)]
        public string Phone { get; set; }

        [HiddenInput(DisplayValue= false)]
        public int StoreId { get; set; }

        [Required]
        public virtual List<Store> Stores { get; set; }
        
 
        public ClientViewModel()
        {
        }

        public ClientViewModel(Client Client)
        {
            this.Id = Client.Id;
            this.PersonName = Client.PersonName;
            this.Phone = Client.Phone;
            this.StoreId = Client.StoreId;
        }
    }
}